﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MenuProject
{
    class Snack : MenuItem
    {
        public double Price { get; private set; }

        public Snack(string name, double price) :base (name)
        {
            if (price < 0)
                throw new ArgumentOutOfRangeException("Price snack incorrect");
            Price = price;
        }


        public override void PrintToConsole()
        {
            Console.WriteLine("{0}: - Price: {1}$", Name, Price);
        }

    }
}
